<template>
    <div>
        <van-notice-bar 
            :mode="mode" 
            :background="background"
            :text="text"
            :color="color"
            :left-icon="leftIcon"
            :scrollable="scrollable"
            :wrapable="wrapable"
            @click="click"
            @close="close"
            @replay="replay"
        >
            <slot></slot>
        </van-notice-bar>
    </div>
</template>
<script>
export default {
    name:"eagle-notice-bar",
    props:{
        mode:{
            type:String,
            default:"",
        },
        text:{
            type:String,
            default:"",
        },
        leftIcon:{
            type:String,
            default:"",
        },
        scrollable:{
            type:Boolean,
            default:()=>false,
        },
        wrapable:{
            type:Boolean,
            default:()=>false,
        },
        color:{
            type:String,
            default:"#f60",
        },
        background:{
            type:String,
            default:"#fff7cc",
        }
    },
    methods:{
        click(){
            this.$emit("click")
        },
        close(){
            this.$emit("close")
        },
        replay(){
            this.$emit("replay")
        }
    }
}
</script>